# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

_gemname=mime-types-data
pkgname=ruby-$_gemname
pkgver=3.2023.0218.1
pkgrel=1
pkgdesc='provides a registry for information about MIME media type definitions'
arch=(any)
url='https://github.com/mime-types/mime-types-data/'
license=(MIT)
depends=(ruby)
makedepends=('ruby-rdoc')
options=(!emptydirs)
source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
noextract=($_gemname-$pkgver.gem)
sha256sums=('e90f027e54346bbbf7bd993a97e9cb7270cd4fe41c535ef84bf5d1aefe1e7ede')

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
  rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
}
